home *** CD-ROM | disk | FTP | other *** search
/ Software Vault: The Gold Collection / Software Vault - The Gold Collection (American Databankers) (1993).ISO / cdr11 / pdox693.zip / TI547.ASC < prev    next >
Text File  |  1992-08-12  |  5KB  |  133 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7.  
  8.   PRODUCT  :  PARADOX                                NUMBER  :  547
  9.   VERSION  :  3.0
  10.        OS  :  DOS
  11.      DATE  :  August 12, 1992                          PAGE  :  1/2
  12.  
  13.     TITLE  :  PAL MEMORY CONSERVATION TIPS
  14.  
  15.  
  16.  
  17.  
  18.                     Memory Conservation Checklist
  19.                     =============================
  20.  
  21.   [] Variables  -  Make variables private to each proc, or RELEASE
  22.                    them individually as soon as possible.
  23.  
  24.                 -  A newly assigned variable will open a 2K block
  25.                    of memory.  When additional variables are
  26.                    assigned, they are added to the block until the
  27.                    block is full, and then a new block is opened.
  28.                    Any 2K block is not returned to the memory pool
  29.                    until every variable in the block is released.
  30.                    So, it is possible to randomly release variables
  31.                    and never empty a complete block, thereby never
  32.                    affecting the overall memleft.
  33.  
  34.   [] Procedures -  Keep them under 12K, preferably under 4K.  Small
  35.                    procs allow more efficient swapping.
  36.  
  37.   [] Libraries  -  Each library has its own directory listing that
  38.                    will be loaded into RAM when a proc is called.
  39.                    Usually a 2K block is reserved for this
  40.                    directory listing, but the block could be as
  41.                    large as 12K or more if the library was created
  42.                    with the size option greater than the default of
  43.                    50.  Potential trouble is that this block must
  44.                    be a contiguous block.  You may need SETSWAP
  45.                    greater than 50000 to find a contiguous 12K
  46.                    block of memory.  It is easier to keep the
  47.                    libraries small.
  48.  
  49.   [] Autolib    -  This is the preferred management tool in
  50.                    versions 2.0 or higher.  The READLIB and RELEASE
  51.                    PROCS are largely outdated now, except for in
  52.                    special cases such as reading in an error
  53.                    procedure, which cannot be found from AUTOLIB.
  54.  
  55.   [] Setswap    -  SETSWAP goes hand in hand with AUTOLIB.
  56.  
  57.                 -  SETSWAP fixes the minimum value of MEMLEFT()
  58.                    before procedure swapping starts.
  59.  
  60.  
  61.  
  62.  
  63.  
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70.  
  71.  
  72.  
  73.  
  74.   PRODUCT  :  PARADOX                                NUMBER  :  547
  75.   VERSION  :  3.0
  76.        OS  :  DOS
  77.      DATE  :  August 12, 1992                          PAGE  :  2/2
  78.  
  79.     TITLE  :  PAL MEMORY CONSERVATION TIPS
  80.  
  81.  
  82.  
  83.  
  84.                 -  SETSWAP can be dynamically allocated by you, the
  85.                    PAL programmer, to achieve the best mix of
  86.                    performance and MEMLEFT().  A higher SETSWAP
  87.                    will result in more frequent swapping and
  88.                    somewhat slower performance.  At the same time,
  89.                    it will make more room (memory) to add an
  90.                    additional table to the workspace or to execute
  91.                    a query.  SETSWAP at 50000 will try to reserve
  92.                    50K table processing.  You can raise and lower
  93.                    SETSWAP in an application as needed.
  94.  
  95.   [] Swapability - Things that can swap:
  96.  
  97.                    - Myprocname()      ; A proc by itself on a line
  98.                    - X = Myprocname()  ; Similar to the above
  99.  
  100.                  - Things that can inhibit swapping:
  101.  
  102.                    - EXECUTE "anyproc()"+variable+""
  103.                    - escape = NOT Myproc()
  104.                    - Any procs that are defined in-line in a script
  105.                      but are not in a library
  106.  
  107.                  - Potential problem:
  108.  
  109.                    - proc anyproc()      ; A script may not be able
  110.                         PLAY "ScriptA"   ; to return to a proc if
  111.                      endproc             ; the proc was swapped out
  112.                                          ; Avoid scripts inside of
  113.                                          ; procedures
  114.  
  115.                  - Samples that will swap:
  116.  
  117.                    - Myproc()          ; A proc on a line by itself
  118.                    - variable1 = myproc()
  119.                      variable2 = NOT variable1
  120.  
  121.   DISCLAIMER: You have the right to use this technical information
  122.   subject to the terms of the No-Nonsense License Statement that
  123.   you received with the Borland product to which this information
  124.   pertains.
  125.  
  126.  
  127.  
  128.  
  129.  
  130.  
  131.  
  132.  
  133.